package com.xnyzc.lhy.task.fegin.activity;

import com.xnyzc.lhy.task.config.TokenAuthConfiguration;
import com.xnyzc.lhy.task.fallback.activity.QuartzActivityStatisticsFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @Author: haoyfa
 * @Date: 2019-12-29
 * @Description 司机活动相关
 */
@Service
@FeignClient(name = "${feign.applicationName.mis}", configuration = TokenAuthConfiguration.class, fallback = QuartzActivityStatisticsFallback.class)
public interface QuartzActivityStatisticsService {

    /**
     * 更新活动状态，包括活动定义和活动周期
     * 定时任务调用，每隔1分钟调用1次
     */
    @PostMapping(value = "/activity/activityDef/updateActivityStatus")
    void updateActivityStatus();

    /**
     * 活动周期完成
     * 定时任务调用，每天凌晨4点执行
     * @return
     */
    @PostMapping(value = "/activity/activityPeriod/completeActivityPeriod")
    void completeActivityPeriod();

    /**
     * 活动奖励计算
     * 定时任务调用，每隔1分钟调用1次
     */
    @PostMapping(value = "/activity/activityPeriod/calActivityPeriodReward")
    void calActivityPeriodReward();
}
